﻿CREATE TABLE [dbo].[Room]
(
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RowId] [uniqueidentifier] ROWGUIDCOL DEFAULT (NEWID()) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedDate] [datetime] NOT NULL,
	[ModifiedByUserId] [int] NULL,
	[Version] [timestamp] NOT NULL,
	[EntranceId] [int] NOT NULL,
	[FloorId] [int] NOT NULL,
	[Name] [nvarchar](64) NOT NULL,
	[Number] [smallint] NOT NULL,
	[SaleArea] [numeric](12,2) NOT NULL,
	[UnitPrice] [numeric](12,2) NOT NULL,
	[TotalPrice] [numeric](12,2) NOT NULL,
	[RoomTypeId] [int] NULL,
	[UsageId] [int] NULL,
	[DeliveryModeId] [int] NULL,
	[RoomStateId] [int] NOT NULL,
	[ActiveAgreementId] [int] NULL,
	[Description] [nvarchar](512) NULL,
)